package com.ruoyi.bizsys.mapper;

import java.util.List;

import com.ruoyi.bizsys.domain.LoanOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.bizsys.domain.ProductInfo;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.bizsys.vo.LoanOrderVo;

/**
 * 借款申请Mapper接口
 *
 * @author african-loan
 * @date 2021-12-30
 */
public interface LoanOrderMapper extends BaseMapper<LoanOrder>{

    List<LoanOrder> getReturnRunLoanData(Integer andonTaskMinute);

    int isBiggerByCustNo(@Param("custNo") String custNo, @Param("loanSerialNo") String loanSerialNo);

    List<LoanOrderVo> selectLoanOrderPending();

    List<LoanOrderVo> selectLoanOrder();

    int updateBatch(List<LoanOrder> loanOrders);

    LoanOrder pessimisticLockById(long id);

    long getProductIdByloanSerialNo(String loanSerialNo);

    ProductInfo selectLoanOrderProduct(String custNo);
}
